package com.itlong.cloud.enumerate.ecode;


import lombok.Getter;
import lombok.Setter;

/**
 * APP错误码定义
 *
 * @author cuiduanwu
 * @createDate 2017--20 8:23
 */
public enum  AppErrorCodeEnum  {
    /*
    *mainCode为1表示APP模块错误，subCode可用范围为1至999；
   */
    SMSCODE_ERR(1,1,"请输入正确的验证码"),

    PHONE_NOT_MATCH(1,2,"手机号码格式错误，请重新输入"),

    SMSCODE_SEND_ERR(1,3,"验证码发送失败"),

    EXIST_PHONENO(1,4,"手机号码已存在"),

    USER_NOT_EXIST(1,5,"账号或密码错误,请重新输入"),

    ROOM_OWNER_PHONE_NOT_EXIST(1,6,"房间户主电话不存在"),

    ROOM_NOT_EXIST(1,7,"房间不存在，请重新选择"),

    UPDATE_PSWD_ERR(1,8,"账号或密码错误，修改密码失败"),

    NOT_EXIST_PHONENO(1,9,"该手机号未注册"),

    OPEN_DEFEATED(1,10,"开门失败"),
    OPEN_SUCCESS(1,11,"开门成功"),
    /******工程版APP—BEGIN*******/
    PHONE_NO_EMPTY_ERR(1,12,"账号不能为空,请重新输入"),
    PASSWORD_EMPTY_ERR(1,13,"密码不能为空，请重新输入"),
    NO_ENGINEER_AUTH(1,14,"当前账号无工程账号权限"),
    PROJECT_ID_EMPTY_ERR(1,15,"项目编号不合法"),
    DEVICE_NAME_EMPTY_ERR(1,16,"设备名称不能为空"),
    DEVICE_TYPE_INVALID_ERR(1,17,"设备类型不合法"),
    DEVICE_UNIQUE_EMPTY_ERR(1,18,"设备唯一编号不能为空"),
    OPEN_THRESHOLD_EMPTY_ERR(1,19,"蓝牙开门阈值不能为空"),
    /******工程版APP—END*******/

    ROOM_NUMBER_EMPTY_ERR(1,20,"房间唯一编号不能为空"),
    USER_REMARKS_EMPTY_ERR(1,21,"授权人备注不能为空"),
    SMSCODE_EXPIRE(1,22,"验证码已过期"),
    PSWD_LENGTH_ERROR(1,23,"密码长度为6-16位"),
    PHONE_PSWD_EMPTY(1,24,"用户名或密码不能为空，请重新输入"),
    FEEDBACK_TOO_LONG(1,25,"字数最多支持300字以内"),
    PROJECT_NOT_MATCH(1,26,"项目编号非法"),
    ROOM_OWNER_PHONE_ERROR(1,27,"房屋户主手机号有误"),
    USER_EXIST_IN_ROOM(1,28,"您已是该房屋的成员，不能重复申请"),
    ROOM_OWNER_IS_EXIST(1,29,"该房屋户主已存在"),
    VISIT_NAME_IS_NULL(1,30,"请填写访客姓名"),
    VISIT_NAME_IS_ERROR(1,31,"姓名格式错误，请重新输入"),
    VISIT_LIMIT_COUNT_IS_NULL(1,32,"有效使用次数不能为空"),
    VISIT_LIMIT_COUNT_IS_ERROR(1,33,"有效使用次数最大为10"),
    VISIT_PHONE_IS_NULL(1,34,"手机号为空"),
    VISIT_PHONE_IS_ERROR(1,35,"手机号格式错误，请重新输入"),
    VISIT_ROOM_IS_NULL(1,36,"请至少选择一个房间"),
    OPEN_PASSWORD_IS_NULL(1,37,"密码不能为空"),
    OPEN_PASSWORD_IS_ERROR(1,38,"密码长度为4位"),
    AUTH_PERSON_EXIST_ERROR(1,39,"该手机号已经授权过"),
    AUTH_PERSON_MAX_ERROR(1,40,"邀请家人数量已达上限"),
    USER_TOKEN_ERROR(1,41,"您的登录已过期，请重新登录"),
    USER_ACCOUNT_REFUSE(1,42,"账号已禁用，请联系物业"),
    USER_REMIND_REPEAT_LOGIN(1,43,"您的账号在别的设备登录，如非本人操作，登录密码可能已泄露，请登录修改密码！"),
    USER_NOT_OWNER(1,44,"您不是户主，没有权限做此操作"),

    USER_ROOM_NO_CHECK(1,45,"您已提交过该授权认证，正在审核，不能重复申请"),
    USER_ROOM_NO_PASS(1,46,"您的认证信息未通过后台审核，请联系小区物业管理中心"),

    BANNER_TYPE_INVALID(1,47,"Banner图类型不合法"),
    PROPERTY_TYPE_INVALID(1,48,"物业信息类型不合法"),
    IMAGE_DATA_INVALID(1,49,"图片数据不合法"),

    NOT_ADD_OPENAUTH_ERROR(1,50,"小区未开放邀请家人权限"),
    ADD_AUTHPERSON_MAX_ERROR(1,51,"邀请家人数量已达上限"),
    ADD_AUTHPERSON_SELF_ERROR(1,52,"户主不能邀请自己"),
    ADD_AUTHPERSON_EXIT_ERROR(1,53,"已经邀请过该用户"),
    EXIT_INVALID_ROOMINFO_ERROR(1,54,"存在非法授权房间信息"),
    NOT_ADDAUTH_ROOMINFO_ERROR(1,55,"当前小区，您无可授权房间信息"),
    IMAGE_UPLOAD_FAILED(1,56,"图片上传失败"),
    ROOM_NUM_IS_FULL(1,57,"房间人数已满，请联系物业管理员"),
    USER_PHONE_IS_NOT_EXIST(1,58,"该手机号码未注册"),
    UPDATE_PSWD_ERROR(1,59,"修改密码失败"),
    EMAIL_NOT_REGISTER(1,60,"该邮箱未注册"),
    EMAIL_NOT_EMPTY_ERROR(1,61,"邮箱不能为空，请重新输入"),
    EMAIL_EXIST_ERROR(1,62,"邮箱已存在"),
    SMSCODE_SEND_SUCCESS(1,63,"验证码发送成功"),
    ACCOUNT_NOT_EXIST_ERR(1,64,"账号或密码错误，请重新输入"),
    OLD_PSWD_ERROR(1,65,"旧密码错误，请重新输入"),
    USER_PROJECT_FREEZE(1,66,"您在%s的住户权限已被冻结...请联系物业管理处%s"),
    USER_PROJECT_DISABLED(1,67,"您在%s的住户权限已被禁用...请联系物业管理处%s"),
    ROOM_NUM_MAX_ERROR(1,67,"%s房间入住人数已满！"),
    OPERATE_TYPE_ERROR(1,68,"操作类型不允许为空！"),
    USER_PROJECT_FREEZE_NOT_AUTH(1,69,"您在%s的住户权限已被冻结，暂时无法邀请家人！"),
    ELEVATOR_FLOOR_ERROR(1,70,"楼层错误"),
    EXIST_CLOUD_ELEVATOR_PRODUCT(1,71,"当前存在云电梯类型,无法继续添加！"),
    USER_ROOM_FREEZE(1,72,"该房屋处于冻结状态，请联系物业管理处"),
    PROJECT_FACE_APPID_INEXISTENCE(1,73,"该项目未开通人脸识别功能,请添加人脸库后使用此功能!"),
    APP_FACE_CREATE_FAIL(1,74,"人脸注册申请失败!"),
    SMSCODE_IS_NULL(1,75,"手机验证码为空!"),
    PROJECT_FACE_APPID_INEXISTENCE_BY_CLOUD_TALK(1,76,"该项目未开通人脸识别功能,请不要上传人脸相关信息或开通人脸识别功能!"),
    NO_DEVICE_AUTH(1,98,"用户房间下没有设备权限"),
    APP_SIGN_ERR(1,99,"参数签名错误"),
    NOT_PARAM(1,100,"参数不匹配"),

    NOT_SUFFICIENT_FUNDS(1,101,"余额不足，请及时充值"),
    NOT_IS_FACE(1,102,"当前用户没有人脸"),
    NOT_CARD_USER(1,103,"当前用户没有和一卡通卡号相关联"),
    NOTN_EXISTENT_ORDER(1,104,"此交易订单号不存在或者系统错误"),
    NOTN_EXISTENT_ACCOUNT(1,105,"当前用户余额账号不存在"),

    FACE_ID_EMPTY_ERROR(1,106,"人脸ID不能为空"),

    USER_NOT_PROJECT(1,107,"当前用户还未绑定项目"),
    CLOUD_ELEVATOR_OUT_LINE(1,108,"预约呼梯失败，当前云电梯不在线！"),
    FLOOR_NOT_VALID_ERR(1,109,"您暂无出发/目的楼层权限，请联系管理处或修改当前楼层"),
    PAD_DEVICE_NOT_EXISTS(1,110,"项目下无此设备！"),
    PAD_ENGINEER_VERIFY_FAIL(1,111,"账号或密码错误，请重新输入！"),
    USER_NOT_ELEVATOR_AUTH_ERROR(1,112,"您无当前电梯使用权限，请联系管理处"),
    USER_NOT_ENTRANCE_AUTH_ERROR(1,113,"您无当前门禁使用权限，请联系管理处"),
    PAD_ENGINEER_VERIFY_PROJECT_FAIL(1,113,"没有权限，请重新输入！"),
    PAD_PROJECT_NOT_EXISTS(1,114,"当前项目不存在！"),
    PAD_ENGINEER_NOT_EXISTS(1,115,"账号或密码错误，请重新输入！"),
    PAD_DEVICE_FORBIDDEN(1,116,"当前设备已被禁用！"),
    PAD_PROJECT_FORBIDDEN(1,117,"当前项目已被禁用！"),
    SMSCODE_SEND_TO_MORE(1,118,"获取验证码次数过于频繁"),
    REPAIR_STATUS_ERR(1,119,"报修数据状态非法"),
    REPAIR_STATUS_HAS_MODIFIED(1,120,"修改失败，该报修数据状态已被管理员操作"),
    TRADE_AMCOUNT_ERR(1,121,"交易金额不能为0或负数"),
    NOT_ALLOWED_WEICHAT_TRADE(1,122,"微信支付暂时升级维护，请您稍后再试"),
    BILL_PAY_SUCCESS(1,123,"该账单已经支付成功，请勿重复支付"),
    ACCOUNT_OUT_OF_DATE_ERR(1,124,"账号已过期"),
    ACCOUNT_FORBIDDEN_ERR(1,125,"账号已被禁用"),
    PASSWORD_ERR(1,126,"密码错误"),
    ROBOT_UNIQUE_EMPTY_ERR(1,127,"机器人唯一码不能为空"),
    ROBOT_LOGIN_COUNT_ERR(1,128,"登录个数已达上限"),
    ACCOUNT_NOT_TO_DATE_ERR(1,129,"账号还未开始生效"),
    COUPON_NOT_EXIST_ERR(1,130,"该优惠券不存在"),
    COUPON_REDEEM_STATUS_ERR(1,131,"该优惠券已被兑换"),
    COUPON_END_TIME_GONE_ERR(1,132,"该优惠券已过期"),
    CAR_IS_NOT_PARKING_ERR(1,133,"车辆未进入停车场,无需缴费"),
    MOON_CARD_IS_NOT_OVERDUE_ERR(1,134,"月卡未到期,无需临时缴费"),
    PHONE_NO_AND_EMAIL_NOT_MATCH(1,135,"手机号码或邮箱格式错误!"),
    GET_PARKING_ACCOUNT_ERR(1,136,"车辆不在场"),
    PAD_USER_FORBIDDEN_ERR(1,137,"您有物业欠费逾期，该功能暂时无法使用，请在app端或至物业处缴费后恢复此功能"),
    PAD_DEVICE_NOT_EXISTS_STATUS(1,138,"当前平板设备不存在！"),
    PAD_DEVICE_BAIDU_AUTH_CODE_EMPTY(1,139,"未使用的百度识别授权码不足!"),
    PAD_DEVICEID_IS_USERD(1,140,"平板机号已被占用！"),
    OPEN_PASSWORD_IS_WEAK_PASSWORD(1,141,"您的密码强度较弱，请更换"),
    EXIST_CLOUD_ENTRANCE_PRODUCT(1,142,"当前存在门禁类型,无法继续添加！"),
    CLOUD_ENTRANCE_EXISTS(1,143,"当前设备不可用"),
    MANAGEMENT_USER_TOKEN_ERROR(1,144,"您的登录Token错误"),
    EXIST_CLOUD_CONTROLLER_PRODUCT(1,145,"当前存在云群控器类型,无法继续添加！"),
    CLOUD_CONTROLLER_OUT_LINE(1,146,"预约呼梯失败，当前电梯控制器不在线！"),
    PARKING_BUSY_ERROR(1,147,"查费系统忙请重试！"),
    PAD_IS_NOT_NORMAL(1,148,"该设备已到期，部分功能无法正常使用，请联系物业管理员。"),
    BILL_PAY_TOTAL_IS_NOT_SAME(1,149,"账单支付金额与账单实际金额不一致"),
    LOGIN_PASSWORD_IS_ERROR(1,150,"登录密码错误"),
    ADD_VISITOR_ERROR_1(1,151,"您当前剩余通行次数为0次，添加访客失败"),
    ADD_VISITOR_ERROR_2(1,152,"您的二维码授权已过有效期，添加访客失败"),
    ADD_VISITOR_ERROR_3(1,153,"您当前剩余通行次数为%s次，仅能创建≤%s通行次数，添加访客失败"),
    PUB_LOGIN_PARAMS_IS_EMPTY(1,154,"认证参数异常"),
    ACCOUNT_NO_PROJECT_ERROR(1,155,"该账号下无项目"),
    DEVICE_IS_NOT_WHITE_LIST(1,156,"该设备未在设备白名单中！"),
    DEVICE_IS_FORBIDDEN_IN_WHITE_LIST(1,157,"该设备在白名单被禁用！"),
    DEVICE_IS_EXISTS_IN_WHITE_LIST(1,158,"已有设备占用该条白名单信息，请勿重复占用！"),
    PAD_BIND_DEVICE_NOT_EXIST_OR_FORBIDDEN(1,159,"平板绑定的设备被禁用或不存在"),
    DEVICE_TYPE_NOT_SUPPORTED(1,160,"平板绑定的设备中含有不支持的设备类型!"),
    CLOUD_ELEVATOR_OPEN_ERROR(1,161,"开放失败"),
    CLOUD_ENTRANCE_OUT_LINE(1,162,"开门失败，当前门禁不在线！"),
    CLOUD_OUT_IN_CALL_ERROR(1,163,"由于项目需要近场使用，网络选层不可用"),
    CLOUD_TALK_IS_NOT_ONLINE_ERROR(1,164,"当前云对讲设备不在线"),
    DEVELOPER_AUTH_PASSED(1,165,"开发者账号的该项目授权已过期！"),
    DEVICE_NOT_HUAWEI_IOT(1,165,"设备未在华为云上线"),
    ACCOUNT_BAN_ERROR(1,166,"您的账号未激活，暂时无法登录"),
    CLOUD_ENTRANCE_NETWORK_OPEN_IS_CLOSED(1,167,"网络开门功能已禁用"),
    CANCEL_DELIVERY_TASK_FAILED(1,168, "取消派送任务失败"),
    PROJECT_NOT_AUTH(1,169,"项目暂无权限"),
    CLOUD_ELEVATOR_NO_AUTH(1,170,"该用户无该设备权限！"),
    CLOUD_CONNING_SMARTCARD_ERR(1,171,"云平台连接线下平台异常！"),
    SMARTCARD_ERR(1,172,"线下平台返回异常！"),
    ACCOUNT_PASS_TIME_ERROR(1,173, "账号已过有效期"),
    USER_HAVE_PROJECT_ROOM_ERROR(1,174, "此项目下已有认证的房屋，无法删除！"),
    USER_HAVE_PROJECT_DEVICE_AUTH_ERROR(1,175, "此项目下已有设备权限，无法删除！"),
    USER_HAVE_NO_PROJECT_OR_BEEN_DELETED_ERROR(1,176, "无此项目或此项目已被删除！"),
    ;
    @Setter
    @Getter
    private ErrorCode errorCode = new ErrorCode();


    AppErrorCodeEnum(){}
    @Getter
    private String codeMsg;



    /**
     * <desc>
     *     主错误码与错误信息构造函数
     * </desc>
     * @param mainCode
     * @param codeMsg
     */
    AppErrorCodeEnum(Integer mainCode, String codeMsg) {
        errorCode.setMainCode(mainCode);
        errorCode.setSubCode(0);
        errorCode.setCodeMsg(codeMsg);
    }

    /**
     * <desc>
     *     全参构造函数
     * </desc>
     * @param mainCode
     * @param subCode
     * @param codeMsg
     */
    AppErrorCodeEnum(Integer mainCode, Integer subCode, String codeMsg){
        this.codeMsg=codeMsg;
        errorCode.setMainCode(mainCode);
        errorCode.setSubCode(subCode);
        errorCode.setCodeMsg(codeMsg);
    }



}
